﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace Pibby
{
    public class SingleApplicationInstance
    {
        private bool _firstInstance;

        public SingleApplicationInstance()
        {
            string safeName = Application.UserAppDataPath.Replace(@"\", "_");

            new Mutex(true, safeName, out this._firstInstance);
        }

        public bool FirstInstance
        {
            get { return _firstInstance; }
        }
    }
}
